home *** CD-ROM | disk | FTP | other *** search
/ 9-Digit Zip Code Directory / 9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO / z4src.zip / BS.H < prev    next >
C/C++ Source or Header  |  1995-07-23  |  7KB  |  398 lines

  1. //----------------------------------------------------------------------------
  2. //                            MODULE DESCRIPTION
  3. //
  4. //  Module:    bs.h
  5. //   Title:    Base library
  6. //  Notice:    John M. Weeder
  7. //                 Copyright (c) 1993. All rights reserved.
  8. //             This module contains proprietary information and should be 
  9. //                treated as confidential.
  10. //
  11. //----------------------------------------------------------------------------
  12. //                           MAINTENANCE HISTORY
  13. //
  14. // $Workfile$
  15. // $Revision$
  16. //   $Author$
  17. //     $Date$
  18. //      $Log$    
  19. //
  20. //----------------------------------------------------------------------------
  21. //                             MODULE NARRATIVE
  22. //
  23. //
  24. //    This module contains the main header file for the base libraries.
  25. //
  26. //    The code in this module should be written entirely in C. 
  27. //    Do not use any C++ constructs.
  28. //
  29. //    This module is portable to:
  30. //        DOS 3.X+
  31. //        MS Windows 3.X+
  32. //        OS/2 2.X+
  33. //        OS/2 2.0 PM
  34. //        SCO UNIX.
  35. //
  36. //    The following compilers are supported:
  37. //        MSC 6.0A
  38. //        MSC/C++ 7.0
  39. //        Borland C++ 3.1 for DOS
  40. //        Borland C++ 1.0 for OS/2 2.X
  41. //        SCO UNIX cc
  42. //
  43. //----------------------------------------------------------------------------
  44. #include <base.h>
  45.  
  46. //----------------------------------------------------------------------------
  47. //    Data Types
  48. //----------------------------------------------------------------------------
  49. #define SYS_EXIT_PRIORITY    (128)            // Base library exit level
  50.  
  51. #define MAX_BASE_FILES        (15)            // Maximum file which can be opened!
  52. #define FILE_BUF_SIZE        (2048)        // File buffer size
  53.  
  54. typedef struct _BS_HF                    /////    File structure
  55. {
  56.     BOOL fUsed;                                    // File structure used?
  57.                                                 ///// File data
  58.     BOOL fError;                                // Error has occurred
  59.         FPOS fpos;                                                                      // File position
  60.     FLAG32 fl;                                    // Open flags!
  61.     int handle;                                    // File handle
  62.                                                 ///// File name/line
  63.     PCSZ pcszName;                                // File name
  64.     ULONG    ulLine;                                // Line number
  65.                                                 ///// Buffered i/o 
  66.         ULONG fsize;
  67. //        FPOS fsize;      // Remaining size of file   out for testing
  68.     SIZET cBuf;                                    // Size of buffer
  69.     SIZET cDat;                                    // Amount of data in buffer
  70.     SIZET cOff;                                    // Offset of next char to use in buffer
  71.     PCSZ pcszBuf;                                // Buffer
  72.                                                 ///// Tokenizer flags
  73.     BOOL fIgnoreCase;                            // Ignore case?
  74.     BOOL fEof;                                    // End of file?
  75.     BOOL fSof;                                    // Start of line?
  76.     BOOL fNewLine;                                // Line line read in?
  77.                                                 ///// Data for current token
  78.     PSZ pszText;                                // Text of current token
  79.     USHORT token;                                // Current token value
  80.     LONG lVal;                                    // Integer value of token
  81.     SHORT sVal;                                    // Keyword or token value
  82.                                                 ///// Current line being tokenized
  83.     PSZ pszLine;                                // Current input line
  84.     PSZ psz;                                        // Pointer to next char to process
  85.                                                 ///// Tokenizer keywords and operators
  86.     PPSZ ppszKeywords;                        // NULL terminated list of keywords
  87.     PPSZ ppszOperator;                        // NULL terminated list of operators
  88. } BS_HF;
  89. BASETYPE(BS_HF);
  90.  
  91.  
  92. //----------------------------------------------------------------------------
  93. //    Prototypes
  94. //----------------------------------------------------------------------------
  95. //
  96. //    bsassert.c
  97. //
  98. BOOL FN AssertTest(SHORT);
  99.  
  100. //
  101. //    bsbcd.c
  102. //
  103. BOOL FN BcdTest(SHORT);
  104.  
  105. //
  106. //    bsboot.c
  107. //
  108. BOOL FN BootTest(SHORT sTest);
  109.  
  110. //
  111. //    bscmdline.c
  112. //
  113. #define NULOPT(x)        (((x)->psz == NULL)&&((x)->pv == NULL)&&((x)->fs == 0))
  114.  
  115. #if OS_WINDOWS
  116. VOID FN CommandLineInitialize(HINSTANCE, HINSTANCE, LPSTR, int);
  117. #else
  118. VOID FN CommandLineInitialize(int, char **);
  119. #endif
  120. BOOL FN CommandLineTest(SHORT);
  121.  
  122. //
  123. //    bscprite.c
  124. //
  125. BOOL FN CopyrightTest(SHORT);
  126.  
  127. //
  128. //    bscpu.c
  129. //
  130. BOOL FN CpuTest(SHORT);
  131.  
  132. //
  133. //    bscrc.c
  134. //
  135. BOOL FN CrcTest(SHORT);
  136.  
  137. //
  138. //    bscrierr.c
  139. //
  140. VOID FN_E CritErrInitialize(void);
  141. VOID FN_E CritErrTerminate(void);
  142. BOOL FN CritErrTest(SHORT);
  143.  
  144. //
  145. //    bsctrlc.c
  146. //
  147. VOID FN_E CtrlCInitialize(void);
  148. VOID FN_E CtrlCTerminate(void);
  149.  
  150. //
  151. //    bsdebug.c
  152. //
  153. PSZ FN DebugContext(PSZ, BOOL);
  154. SIZET FN DebugLine(void);
  155. PCSZ FN DebugModule(void);
  156. BOOL FN DebugTest(SHORT);
  157.  
  158. //
  159. //    bsdisp.c
  160. //
  161. BOOL FN DisplayTest(SHORT sTest);
  162.  
  163. //
  164. //    bsdrive.c
  165. //
  166. BOOL FN DriveTest(SHORT sTest);
  167.  
  168.  
  169. //
  170. //    bsebcdic.c
  171. //
  172. BOOL FN EbcdicTest(SHORT);
  173.  
  174. //
  175. //    bsenv.c
  176. //
  177. BOOL FN EnvTest(SHORT);
  178.  
  179. //
  180. //    bserror.c
  181. //
  182. BOOL FN ErrorTest(SHORT);
  183.  
  184. //
  185. //    bsfcopy.c
  186. //
  187. BOOL FN CopyTest(SHORT);
  188.  
  189.  
  190. //
  191. //    bsfile.c
  192. //
  193. PBS_HF FN FileHandle(HF);
  194. BOOL FN_A FileIsLockingSupported(BOOL);
  195. BOOL FN FileTerminate(void);
  196. BOOL FN FileTest(SHORT);
  197.  
  198. //
  199. //    bsfile2.c
  200. //
  201. BOOL FN TextInTest(SHORT sTest);
  202.  
  203. //
  204. //    bsfile3.c
  205. //
  206. BOOL FN TextOutTest(SHORT sTest);
  207.  
  208. //
  209. //    bsfile4.c
  210. //
  211. BOOL FN FileTokenTest(SHORT);
  212.  
  213. //
  214. //    bsfinfo.c
  215. //
  216. BOOL FN FinfoTest(SHORT);
  217.  
  218. //
  219. //    bsfname.c
  220. //
  221. BOOL FN FnameTest(SHORT);
  222.  
  223. //
  224. //    bsgarble.c
  225. //
  226. BOOL FN GarbleTest(SHORT);
  227.  
  228. //
  229. //    bshalt.c
  230. //
  231. BOOL FN HaltTest(SHORT);
  232.  
  233. //
  234. //    bsheap.c
  235. //
  236. VOID FN_E HeapInitialize(void);
  237. VOID FN_E HeapTerminate(void);
  238. BOOL FN HeapTest(SHORT);
  239.  
  240. //
  241. //    bsio.c
  242. //
  243. VOID FN_E OutputInitialize(void);
  244. VOID FN_E OutputTerminate(void);
  245. BOOL FN IOTest(SHORT);
  246.  
  247. //
  248. //    bskbd.c
  249. //
  250. VOID FN KbdInitialize(void);
  251. BOOL FN KbdTest(SHORT);
  252.  
  253. //
  254. //    bslev.c
  255. //
  256. BOOL FN LevTest(SHORT);
  257.  
  258. //
  259. //    bslog.c
  260. //
  261. BOOL FN_E Log_DebugV(USHORT, PCSZ, va_list);
  262. BOOL FN_E LogClose(void);
  263. BOOL FN_E LogOpen(void);
  264. BOOL FN LogTest(SHORT);
  265.  
  266. //
  267. //    bsmem.c
  268. //
  269. BOOL FN MemTest(SHORT);
  270.  
  271. //
  272. //    bsmeta.c
  273. //
  274. BOOL FN MetaTest(SHORT);
  275.  
  276. //
  277. //    bsmscdex.c
  278. //
  279. BOOL FN MscdexTest(SHORT);
  280.  
  281. //
  282. //    bsnovell.c
  283. //
  284. BOOL FN NovellTest(SHORT);
  285.  
  286. //
  287. //    bsparent.c
  288. //
  289. BOOL FN ParentTest(SHORT);
  290.  
  291. //
  292. //    bspasswd.c
  293. //
  294. BOOL FN PasswordTest(SHORT);
  295.  
  296. //
  297. //    bspid.c
  298. //
  299. BOOL FN PidTest(SHORT);
  300.  
  301. //
  302. //    bspipe.c
  303. //
  304. BOOL FN PipeTest(SHORT);
  305.  
  306. //
  307. //    bsprtscr.c
  308. //
  309. BOOL FN PrintTest(SHORT);
  310.  
  311. //
  312. //    bsprtscr.c
  313. //
  314. VOID FN_E PrintScreenTerminate(void);
  315. BOOL FN_E PrintScreenTest(SHORT);
  316.  
  317. //
  318. //    bspsize.c
  319. //
  320. BOOL FN ProgSizeTest(SHORT);
  321.  
  322. //
  323. //    bsquery.c
  324. //
  325. BOOL FN QueryTest(SHORT);
  326.  
  327. //
  328. //    bsrandom.c
  329. //
  330. BOOL FN RandomTest(SHORT);
  331.  
  332. //
  333. //    bsrev.c
  334. //
  335. BOOL FN RevisionTest(SHORT);
  336.  
  337. //
  338. //    bsserial.c
  339. //
  340. BOOL FN SerialTest(SHORT);
  341.  
  342. //
  343. //    bssleep.c
  344. //
  345. VOID FN SleepInitialize(void);
  346. BOOL FN SleepTest(SHORT);
  347.  
  348. //
  349. //    bssound.c
  350. //
  351. BOOL FN SoundTest(SHORT);
  352.  
  353. //
  354. //    bsstack.c
  355. //
  356. VOID FN_E CheckStack(void);
  357. VOID FN_E ClearStack(void);
  358.  
  359. //
  360. //    bsstr.c
  361. //
  362. BOOL FN StringTest(SHORT);
  363.  
  364. //
  365. //    bsthread.c
  366. //
  367. VOID FN_T TestThreadFunction(PVOID);
  368. BOOL FN ThreadTest(SHORT);
  369.  
  370. //
  371. //    bsumb.c
  372. //
  373. VOID FN_E UmbRestore(void);
  374. BOOL FN UmbTest(SHORT);
  375.  
  376.  
  377. //
  378. //    bsver.c
  379. //
  380. BOOL FN VersionTest(SHORT);
  381.  
  382.  
  383. //
  384. //    bsvollbl.c
  385. //
  386. BOOL FN VolLblTest(SHORT);
  387.  
  388.  
  389. //
  390. //    bswrap.c
  391. //
  392. BOOL FN WrapTest(SHORT);
  393.  
  394. //----------------------------------------------------------------------------
  395. //------------------------------- End of File --------------------------------
  396. //----------------------------------------------------------------------------
  397.  
  398.